home *** CD-ROM | disk | FTP | other *** search
/ Java Programmer's Toolkit / Java Programmer's Toolkit.iso / include / standa~1.h < prev    next >
C/C++ Source or Header  |  1996-01-12  |  2KB  |  76 lines

  1. /*
  2.  * @(#)standardlib.h    1.7 95/07/24  
  3.  *
  4.  * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved.
  5.  *
  6.  * Permission to use, copy, modify, and distribute this software
  7.  * and its documentation for NON-COMMERCIAL purposes and without
  8.  * fee is hereby granted provided that this copyright notice
  9.  * appears in all copies. Please refer to the file "copyright.html"
  10.  * for further important copyright and licensing information.
  11.  *
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  13.  * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  14.  * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  15.  * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  16.  * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  17.  * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  18.  */
  19.  
  20. #ifndef _STANDARDLIB_H_
  21. #define _STANDARDLIB_H_
  22.  
  23. #include <sys/types.h>
  24.  
  25. #ifdef    BUILD_ON_SUNOS4X
  26. #include <sys/socket.h>
  27. #endif    /* BUILD_ON_SUNOS4X */
  28.  
  29. #ifdef BUILD_ON_SUNOS4X
  30. #include <strings.h>
  31. #define    _CTYPE_(i)    (_ctype_[(i)+1])
  32. #else
  33. #include <string.h>
  34. #define    _CTYPE_(i)    ((__ctype+1)[(i)])
  35. #endif
  36.  
  37. /* interface to the EEPROM */
  38. /* XXX Mondo unclean from the portability standpoint this will be a 
  39.  * pain to port to anything other than SPARC (Sun SPARC!) boxes!
  40.  */
  41. #include <sys/types.h>
  42. #ifdef BUILD_ON_SUNOS4X
  43. #include <sundev/openpromio.h>
  44. #endif
  45.  
  46. #ifdef BUILD_ON_SUNOS4X
  47. extern int close(long);
  48. extern int dup2(long, long);
  49. extern int ftruncate(long, long);
  50. extern int vfork(void);
  51. extern int mkdir(char *, int);
  52. extern munmap(void *, size_t);
  53. extern double atof(char *);
  54. extern char *strdup(char *);
  55. extern int ioctl(int, int, void *);
  56. extern int syscall(int, ...);
  57. extern int socket(int domain, int type, int protocol);
  58. extern int bind(int s, struct sockaddr *name, int namelen);
  59. extern int connect(int s, struct sockaddr *name, int namelen);
  60. extern int getsockname(int s, struct sockaddr *name, int *namelen);
  61. extern int setsockopt(int s, int level, int optname, char *optval, int optlen);
  62. extern int sendmsg(int s, struct msghdr *msg, int flags);
  63. extern int recvmsg(int s, struct msghdr *msg, int flags);
  64. #ifdef __GNUC__
  65. extern void *valloc(unsigned int);
  66. extern void *memalign(unsigned int, unsigned int);
  67. #else
  68. extern char *valloc(unsigned int);
  69. extern char *memalign(unsigned int, unsigned int);
  70. #endif
  71. #else    /* BUILD_ON_SUNOS4X */
  72. /* all defined in <stdlib.h> */
  73. #endif    /* BUILD_ON_SUNOS4X */
  74.  
  75. #endif /* !_STANDARDLIB_H_ */
  76.